<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>

<!DOCTYPE html>
<html>
	<head>
	<meta charset="UTF-8">
	<title>项目管理系统</title>
	<link href="static/bootstrap/css/bootstrap.min.css" type="text/css" rel="stylesheet"></link>
	<link href="static/css/wall.css" type="text/css" rel="stylesheet"></link>
	</head>
	<body class="body">
		<%@ include file="top.jsp" %>
		<div class="container"style="padding-top:60px">
			<div class="row">
				<jsp:include page="left.jsp">
					<jsp:param value="goal" name="tag"/>
				</jsp:include>
				<div class="span9">
					<ul class="breadcrumb" style="margin-bottom:0px;border-radius: 3px 3px 0 0;margin-top:15px">
						<li class="active">
							<a href="#">
								<i class="icon-th"></i>
								${sessionScope.goal.name }
							</a>
						</li>
						<li style="float:right">
							<i class="icon-edit"></i>
							<a class="link-black" href="goal.jspx?m=edit&id=${sessionScope.goal.id }">编辑</a>
						</li>
					</ul>
					<div class="wall">
						<p>${sessionScope.goal.describe }</p>
						<%-- <c:set var="cla">
							<c:choose>
								<c:when test="${goal.schedule lt 50}">
									value="progress progress-danger active"
								</c:when>
								<c:when test="${goal.schedule lt 80}">
									value="progress progress-info progress-striped active"
								</c:when>
								<c:when test="${goal.schedule eq 100}">
									value="progress progress-success progress-striped active"
								</c:when>
							</c:choose>
						</c:set> --%>
						<div class="progress progress-success progress-striped active">
							<div class="bar" style="width: ${sessionScope.goal.schedule}%;">已完成${sessionScope.goal.schedule}%</div>
						</div>
						<div class="page-header">
							<a class="btn btn-success" href="task.jspx?m=add">
								<i class="icon-plus icon-white"></i>
								添加新任务
							</a>
						</div>
						<dl>
							<c:forEach items="${requestScope.taskList }" var="task">
								<dt style="margin-top:15px">
									<i class="icon-bookmark"></i>
									<a href="task.jspx?m=edit&id=${task.id }">${task.name }</a>
									[${task.member.name }]&nbsp&nbsp
									开始时间：${task.begintime }&nbsp&nbsp
									结束时间：${task.finishtime }
								</dt>
								<dd>${task.describe }</dd>
								<c:choose>
									<c:when test="${task.schedule<30 }">
										<div class="progress progress-danger progress-striped active">
											<div class="bar" style="width: ${task.schedule}%;">已完成${task.schedule}%</div>
										</div>
									</c:when>
									<c:when test="${task.schedule>=30 && task.schedule<60 }">
										<div class="progress progress-warning progress-striped active">
											<div class="bar" style="width: ${task.schedule}%;">已完成${task.schedule}%</div>
										</div>
									</c:when>
									<c:when test="${task.schedule>=60 && task.schedule<100 }">
										<div class="progress progress-info progress-striped active">
											<div class="bar" style="width: ${task.schedule}%;">已完成${task.schedule}%</div>
										</div>
									</c:when>
									<c:when test="${goal.schedule==100 }">
										<div class="progress progress-success progress-striped active">
											<div class="bar" style="width: ${task.schedule}%;">已完成${task.schedule}%</div>
										</div>
									</c:when>
								</c:choose>
							</c:forEach>
						</dl>
					</div>
				</div>
			</div>
		</div>
		<script type="text/javascript" src="static/jquery/jquery.js"></script>
  		<script type="text/javascript" src="static/bootstrap/js/bootstrap.min.js"></script>
	</body>
</html>